package ioc

import (
	"github.com/robfig/cron/v3"
	"webook/internal/job"
)

func InitJob(j job.Job) *cron.Cron {
	c := cron.New(cron.WithSeconds())
	cronJob := job.NewCronJobBuilder().Build(j)
	c.AddJob("@every 1m", cronJob)
	return c
}
